﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IQKS.AWP.DataAccessLayer;
using System.Data;

namespace IQKS.AWP.BusinessAccessLayer
{
   public class CandidateDetailsBAL
    {
        //public DataSet GetCandidateDetails()
        //{
        //    DataSet objDs;
        //    try
        //    {
        //        objDs = new CandidateDetailsDAL().GetCandidateDetails(0);

        //    }
        //    catch (Exception exception)
        //    {
        //        throw new ApplicationException(exception.Message);
        //    }
        //    return objDs;
        //}

        public DataSet DS_GetCandidateDetails(params object[] param)
        {
            DataSet objDs;
            try
            {
                objDs = new CandidateDetailsDAL().GetCandidateDetails(param);

            }
            catch (Exception exception)
            {
                throw new ApplicationException(exception.Message);
            }
            return objDs;
        }

        


        public object SetStatusIdRegApproveDateForCandidateDetails(params object[] param)
        {
            try
            {
                return new CandidateDetailsDAL().SetCandidateDetails(param);
            }
            catch (Exception ex)
            {
                throw new ApplicationException(ex.Message);
            }
        }

       public object SetStatusIdRegRejectDateForCandidateDetails(params object[] param)
        {
            try
            {
                return new CandidateDetailsDAL().SetCandidateRegistrationReject(param);
            }
            catch (Exception ex)
            {
                throw new ApplicationException(ex.Message);
            }
        }

        //public object SetCandidateStatusBAL(params object[] param)
        //{
        //    try
        //    {
        //        return new CandidateDetailsDAL().SetCandidateStatusDAL(param);
        //    }
        //    catch (Exception ex)
        //    {
        //        throw new ApplicationException(ex.Message);
        //    }
        //}
        public DataSet GetStatus()
        {

            try
            {
                return new CandidateDetailsDAL().GetStatus(0);
            }
            catch (Exception ex)
            {
                throw new ApplicationException(ex.Message);
            }
        }


        public DataSet GetUserDetailByEmailID(params object[] param)
        {

            try
            {
                return new CandidateDetailsDAL().GetUserDetailByEmailID(param);
            }
            catch (Exception ex)
            {
                throw new ApplicationException(ex.Message);
            }
        }


        public DataSet GetAccrediationCompletedCandidates(int regionID,int countryID)
        {
            DataSet objDs;
            try
            {
                objDs = new CandidateDetailsDAL().GetAccrediationCompletedCandidates(regionID,countryID);

            }
            catch (Exception exception)
            {
                throw new ApplicationException(exception.Message);
            }
            return objDs;
        }
        public object SetCandidateInvoice(params object[] param)
        {
            try
            {
                return new CandidateDetailsDAL().SetCandidateInvoice(param);
            }
            catch (Exception ex)
            {
                throw new ApplicationException(ex.Message);
            }
        }
    }
}
